<template>
	<view class="barCon">
		<view class="btnBox">
		<!-- 	<view class="bar-item" @tap="showShareEvent">
				<view class="bar-item-v">
					<text class="iconfont icon-fenxiang"></text>
				</view>
				<view class="text bar-item-v">
					分享
				</view>
			</view> -->
			<!-- <view class="bar-item" @tap="goServer">
				<view class="bar-item-v">
					<text class="iconfont icon-caozuo-dianhua" ></text>
				</view>
				<view class="text bar-item-v">
					客服
				</view>
			</view> -->
			<view class="bar-item">
				<view  class="bar-item-v">
					<text class="iconfont icon-wode2"></text>
				</view>
				<view class="text bar-item-v" @tap="goMy">
					我的
				</view>
			</view>
		</view>
		<view class="upBtn" @tap="goUpLoad" v-show="is_up">
			上传作品
		</view>
		<view class="upBtn disable" v-show="!is_up">
			上传作品
		</view>
		<share ref="showS"></share>
	</view>
	
</template>

<script>
	export default {
		name:"barCon",
		data() {
			return {

			};
		},
		created() {
			// if(this.$route.query.type == "top" ) {
			// 	this.getIS_upTop()
			// } else {
			//
			// }
			// this.getIS_up()
			// console.log(this.is_up);
			// console.log(this.is_up);
		},
		props:['is_up'],
		methods:{
			// async getIS_up(){
			// 	const res = await this.$httpPub({
			// 			  url:'activity/' + this.$route.query.id,
			// 			  method:'get',
			// 			  data:{}
			// 		})
		 //        //console.log(res);
			// 	this.is_up = res.is_upload_btn;
			// },
			showShare() {
				this.showShareEvent();
			},
			showShareEvent() {
				this.$refs.showS.show();
			},
			goUpLoad() {
				var id = this.$route.query.id;
				// console.log(id);
				uni.navigateTo({
					url:'/pages/upLoad/upLoad?id=' + id 
				})
			},
			goServer() {
				var id = this.$route.query.id;
				uni.navigateTo({
					url:'/pages/service/service?id=' + id 
				})
			},
			goMy(){
				var id = this.$route.query.id;
				// console.log(id);
				uni.navigateTo({
					url:'/pages/my/my?id=' + id 
				})
			}
		}
	}
</script>

<style scoped lang="scss">
   .barCon {
	  width: 100%;
	  background-color: #fff;
	  display: flex;
	  position: fixed;
	  bottom: 0;
	  left:0;
	  .btnBox {
		  width: 481rpx;
		  flex:none;
		  display: flex;
		  .bar-item-v {
			  text-align: center;
		  }
		  .bar-item {
			  width: 33.33%;
			  display: block;
			  padding-top: 18rpx;
			  .iconfont {
				font-size: 40rpx;
			  }
			  .text {
				font-size: 28rpx;
			  }
		  }
	  }
	  .upBtn {
		  flex:none;
		  width: 269rpx;
		  height: 113rpx;
		  color:#fff;
		  font-size: 32rpx;
		  background-color: #f24545;
		  @include center();
		  &.disable {
			  background-color: #ff9b9b;
		  }
	  }
   }
</style>